<?php

require 'vars.php';
require 'functs.php';
require 'config.mysql.php';

session_name("featherChat-".(dirname($_SERVER[PHP_SELF])));
session_start();

$link = mysql_connect($mysql_server,$mysql_user,$mysql_pass) or die('Unable to connect to MySQL server: ' . mysql_error());
mysql_select_db($mysql_db,$link) or die ('Can\'t use db: ' . mysql_error());

$user = mysql_real_escape_string($_SESSION[user]);

$_SESSION = array();

session_destroy();

Drop_token($user,$_COOKIE["featherCookie-".(dirname($_SERVER[PHP_SELF]))]);
setcookie ("featherCookie-".(dirname($_SERVER[PHP_SELF])), "", time() - 3600);

Page_startup($title,$version);

?>
<div>Goodbye!<br /><br />
<a href="index.php">Home</a></div>

<?php

Page_shutdown();

?>